import re
pattern = r'[?|&]'
url = 'http://www.pythonchallenge.com?pc&def'
result = re.split(pattern, url)
print(result)